



//定义模块
var app=angular.module('last',['ngRoute']);

//定义路由， 映射到控制器和模块
app.config(['$routeProvider', function ($routeProvider) {
    $routeProvider
        .when('/moren',{
            templateUrl:'resources/shangcheng.html',
            controller:'moren'
        })/*里面有俩参数，一个是路径，一个是 模板控制器（即先前的控制器方法名）*/
        .when('/shejiao',{
            templateUrl:'resources/shejiao.html',
            controller:'shejiao'
        })
        .when('/work',{
            templateUrl:'resources/work.html',
            controller:'work'
        })
        .when('/new',{
            templateUrl:'resources/new.html',
            controller:'new'
        })
        .when('/bank',{
            templateUrl:'resources/bank.html',
            controller:'bank'
        })
        .otherwise({
            redirectTo:'/index'
        })

}]);

//定义控制器
app.controller('lastCotroller', all)
    .controller('moren',moren1)
    .controller('shejiao',shejiao1)
    .controller('work',work1);